/*
 * Edge.cpp
 *
 *  Created on: 16/11/2011
 *      Author: Aeradon
 */

#include "../include/edge.hpp"


Edge::Edge(Vertex* v1, Vertex* v2) :
	v1(v1),
	v2(v2),
	outEdge(0),
	vecIndex(0),
	isConstrained(false)
{

}

void Edge::resetEdge(Vertex* v1, Vertex* v2)
{
	this->v1 = v1;
	this->v2 = v2;
	// isConstrained = false;
}

Edge::~Edge()
{

}

Vertex * Edge::getOtherEnd(Vertex * v)
{
	if (v == v1) return v2;
	if (v == v2) return v1;
	return nullptr;
}
